import 'package:xin_he/generated/json/base/json_convert_content.dart';
import 'package:xin_he/page/mine/xin_he_mine/x_in_he_my_favor/xin_he_my_favor_item_entity.dart';

XinHeMyFavorItemEntity $XinHeMyFavorItemEntityFromJson(Map<String, dynamic> json) {
	final XinHeMyFavorItemEntity xinHeMyFavorItemEntity = XinHeMyFavorItemEntity();
	final int? sellerUserId = jsonConvert.convert<int>(json['sellerUserId']);
	if (sellerUserId != null) {
		xinHeMyFavorItemEntity.sellerUserId = sellerUserId;
	}
	final String? sellerName = jsonConvert.convert<String>(json['sellerName']);
	if (sellerName != null) {
		xinHeMyFavorItemEntity.sellerName = sellerName;
	}
	final String? sellerIconPath = jsonConvert.convert<String>(json['sellerIconPath']);
	if (sellerIconPath != null) {
		xinHeMyFavorItemEntity.sellerIconPath = sellerIconPath;
	}
	final List<XinHeMyFavorItemGoodsCollectViews>? goodsCollectViews = jsonConvert.convertListNotNull<XinHeMyFavorItemGoodsCollectViews>(json['goodsCollectViews']);
	if (goodsCollectViews != null) {
		xinHeMyFavorItemEntity.goodsCollectViews = goodsCollectViews;
	}
	return xinHeMyFavorItemEntity;
}

Map<String, dynamic> $XinHeMyFavorItemEntityToJson(XinHeMyFavorItemEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['sellerUserId'] = entity.sellerUserId;
	data['sellerName'] = entity.sellerName;
	data['sellerIconPath'] = entity.sellerIconPath;
	data['goodsCollectViews'] =  entity.goodsCollectViews?.map((v) => v.toJson()).toList();
	return data;
}

XinHeMyFavorItemGoodsCollectViews $XinHeMyFavorItemGoodsCollectViewsFromJson(Map<String, dynamic> json) {
	final XinHeMyFavorItemGoodsCollectViews xinHeMyFavorItemGoodsCollectViews = XinHeMyFavorItemGoodsCollectViews();
	final int? id = jsonConvert.convert<int>(json['id']);
	if (id != null) {
		xinHeMyFavorItemGoodsCollectViews.id = id;
	}
	final int? fSellerUserId = jsonConvert.convert<int>(json['fSellerUserId']);
	if (fSellerUserId != null) {
		xinHeMyFavorItemGoodsCollectViews.fSellerUserId = fSellerUserId;
	}
	final String? name = jsonConvert.convert<String>(json['name']);
	if (name != null) {
		xinHeMyFavorItemGoodsCollectViews.name = name;
	}
	final String? iconPath = jsonConvert.convert<String>(json['iconPath']);
	if (iconPath != null) {
		xinHeMyFavorItemGoodsCollectViews.iconPath = iconPath;
	}
	final double? price = jsonConvert.convert<double>(json['price']);
	if (price != null) {
		xinHeMyFavorItemGoodsCollectViews.price = price;
	}
	final String? sellerName = jsonConvert.convert<String>(json['sellerName']);
	if (sellerName != null) {
		xinHeMyFavorItemGoodsCollectViews.sellerName = sellerName;
	}
	final String? sellerIconPath = jsonConvert.convert<String>(json['sellerIconPath']);
	if (sellerIconPath != null) {
		xinHeMyFavorItemGoodsCollectViews.sellerIconPath = sellerIconPath;
	}
	return xinHeMyFavorItemGoodsCollectViews;
}

Map<String, dynamic> $XinHeMyFavorItemGoodsCollectViewsToJson(XinHeMyFavorItemGoodsCollectViews entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['fSellerUserId'] = entity.fSellerUserId;
	data['name'] = entity.name;
	data['iconPath'] = entity.iconPath;
	data['price'] = entity.price;
	data['sellerName'] = entity.sellerName;
	data['sellerIconPath'] = entity.sellerIconPath;
	return data;
}